//
//  YMBackView.swift
//  YMSwiftUI
//
//  Created by anscen on 2022/3/30.
//

import SwiftUI

struct BaseNavigationBarBackButton: View {
    @Environment(\.presentationMode) var presentationMode
    var body: some View {
        Button(action: {
            self.presentationMode.wrappedValue.dismiss()
        }, label: {
            HStack {
                Image("icon_nav_back").frame(width: 44, height: 44, alignment: .leading)
            }
        })
    }
}

struct YMBackView_Previews: PreviewProvider {
    static var previews: some View {
        BaseNavigationBarBackButton()
    }
}
